<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<title>Team Programming Model</title>

</HEAD>
<BODY BGCOLOR="#ffffff">
<H1 CLASS="Head">
Team Programming Model</H1>
<P CLASS="Para">
Normally each team-member does all of their work in their own individual workbench, isolated from others.&nbsp;
Eventually they will want to share their work with others, and get their
team-mates changes.&nbsp; They do this via streams.</P>
<h2>
Streams</h2>
<P CLASS="Para">
Streams are the place where a team shares and integrates their ongoing work.</P>
<P CLASS="Para">
A stream can be thought of as a shared workspace that is updated by team members as they make changes to the project. This model allows individuals
to work on a team project, share their work with others as changes are made, and access the work of others
as the project evolves.</P>
<DIV CLASS="Topic">
<h2>
Sharing Work</h2>
<P CLASS="Para">As team members produce new work, they share this work by <i>releasing</i>
those changes to the stream. Similarly, when they wish to get the latest
available work, they <i>catch up</i> to the changes on the
stream.&nbsp; Thus the stream is constantly changing, moving forward as team
members submit new work.</P>
<P CLASS="Para">The stream effectively represents the current state of the
project. At any point a team member can catch up to the stream and know they
are up to date.</P>
<DIV CLASS="Figure">
<DIV>
<MAP NAME="ref-9">
</MAP>
<IMG SRC="../images/ref-9.gif" USEMAP="#ref-9" width="344" height="183">
</DIV>
<P CLASS="FigureTitle" align="left">
Team Programming Model</P>
</DIV>
<DIV CLASS="XRefList">
<P CLASS="Para">
Related Topics:</P>
<LI CLASS="Item">
<A HREF="ref-53.htm" CLASS="XRef">See Catching Up</A></LI>
<LI CLASS="Item">
<A HREF="ref-54.htm" CLASS="XRef">See Releasing</A></LI>
</DIV>
</DIV>
<DIV CLASS="Topic">

</DIV>
<DIV CLASS="Topic">
<h2>
Optimistic Team Model</h2>
<P CLASS="Para">
Version control systems provide two important features required for working in a
team:</P>
<ol>
  <li>
    <p CLASS="Para">a history of the work submitted by the team</li>
  <li>
    <p CLASS="Para">a way to coordinate and integrate this work.</li>
</ol>
<P CLASS="Para">
Maintaining history is important so that one can compare the current work
against previous, revert to older work that is better, etc.&nbsp; Coordinating
the work is critical so that there exists one definition of the current project state, containing the integrated work of the team. This
coordination is provided via the stream model.</P>
<P CLASS="Para">An optimistic model is one where any member of the team can make
changes to any resource he/she has access to.&nbsp; Because two team members can
release to the stream changes to the same resource, conflicts can occur and must
be dealt with. This model is termed <i>optimistic</i> because it is assumed that
conflicts are rare.</P>
<h2>Ideal Work Flow</h2>
<h3>Motivation</h3>
<P CLASS="Para">Usually resources don't exist in isolation: they typically
contain implicit or explicit dependencies on other resources.&nbsp; For example,
web pages have links to other web pages, and source code has references to artifacts
described in other source code resources.&nbsp; No resource is an island.</P>
<P CLASS="Para">
As resources are released to the stream, these dependencies can be affected.
Ensuring the integrity of the dependencies is important because the stream
represents the current project state: at any point a team member could take the
stream contents as a basis for new work.</P>
<P CLASS="Para">The ideal work flow therefore is one in which the stream
integrity is preserved.</P>
<h3>Ideal Flow Enumerated</h3>
<P CLASS="Para">The ideal work flow proceeds as follows:</P>
<ol>
  <li>
    <p CLASS="Para">Start fresh: Before starting work, get caught up with the
    current stream state. If you are sure that you have no local work that you
    care about, the fastest way to get caught up is to select the projects you
    are interested in from the stream and select &quot;Add to Workspace&quot;.
    This will blanket overwrite your local resources with those from the stream.</li>
  <li>
    <p CLASS="Para">Make changes: Work locally in your workbench, creating new
    resources, modifying existing ones, saving locally as you go.</li>
  <li>
    <p CLASS="Para">Synchronize: When you are ready to release your work,
    Synchronize with the stream.</li>
  <li>
    <p CLASS="Para">Catch up: Examine incoming changes and add them to your
    local workbench. This allows you to determine if there are changes which
    might affect the integrity of what you are about to release. Resolve
    conflicts. Retest, run integrity checkers (e.g. check for broken hypertext
    links, ensure your code compiles, etc.).</li>
  <li>
    <p CLASS="Para">Release: Now that you are confident that your changes are
    well integrated with the latest stream contents, release your changes to the
    stream. To be
    prudent, you may repeat step 4 if there are again new incoming changes.</li>
</ol>
<p CLASS="Para">Of course this is an <i>ideal</i> workflow. Under certain
conditions you may be confident that the incoming changes do not affect you and
choose to release without catching up. However, in general team members should
make an effort to follow a flow similar to the above in order to ensure that the
stream integrity is not accidentally compromised.
<p>&nbsp;
</DIV>
<P>&nbsp;<br>
<img src = ../ngibmcpy.gif width="195" height="12">
</P>


</BODY>
</HTML>
